import { request } from "@/request";

export async function login(body, options) {
  return request("/login", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    data: body,
    ...(options || {}),
  });
}

export async function getUserInfo(options) {
  return request("/user/getInfo", {
    method: "GET",
    ...(options || {}),
  });
}


export async function outLogin(options) {
  return request("/logout", {
    method: "DELETE",
    ...(options || {}),
  });
}

export async function updatePassword(data) {
  return await request("/user/updatePassword", {
    method: "POST",
    data,
  });
}

